package book;

import java.awt.print.Book;

/**
 * @Author @fiber-cloud
 * @Date 2025/7/13 15:08
 */
public class bookList {
    // 书架其实就是一个book数组
    private book[] books = new book[20];
    private int count ;//实际上放置图书的数量

    //先往里面存几本
    public bookList() {
        this.books[0] =  new book("三国演义","罗贯中",15,"小说");
        this.books[1] =  new book("西游记","吴承恩",15,"小说");
        this.books[2] =  new book("红楼梦","曹雪芹",15,"小说");
        this.count = 3;
    }


    //构造方法
    public book getBooks(int index){
        return books[index];
    }
    public void setBooks(int index, book book){
        this.books[index] = book;
    }

    public int getCount() {
        return count;
    }
    public void setCount(int count) {
        this.count = count;
    }


}
